package pl.grabar.clinic.core.domain.person;

import java.io.Serializable;
import java.util.List;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Transient;

import com.fasterxml.jackson.annotation.JsonIgnore;

import pl.grabar.clinic.core.domain.person.data.OfficeHours;

/**
 * Klasa reprezentuje doktora kliniki
 * 
 * @author db
 * 
 */
@Entity
@Table(name = "DOCTOR")
public class Doctor extends User implements Serializable {

	private static final long serialVersionUID = -8449686815459148112L;

	@OneToMany(fetch = FetchType.EAGER, cascade = { CascadeType.PERSIST, CascadeType.MERGE, CascadeType.REFRESH })
	@JoinColumn(name = "DOCTOR_ID")
	@JsonIgnore
	private List<OfficeHours> officeHours;

	@Column(name = "OFFICE_NUMBER")
	@JsonIgnore
	private String officeNumber;

	@Column
	private String specialization;

	/* AKCESORY */

	public String getSpecialization() {
		return specialization;
	}

	public void setSpecialization(String specialization) {
		this.specialization = specialization;
	}

	public List<OfficeHours> getOfficeHours() {
		return officeHours;
	}

	public void setOfficeHours(List<OfficeHours> officeHours) {
		this.officeHours = officeHours;
	}

	public String getOfficeNumber() {
		return officeNumber;
	}

	public void setOfficeNumber(String officeNumber) {
		this.officeNumber = officeNumber;
	}

}
